var express = require('express');
var router = express.Router();

var GET = {
    merchantCreate : require("./merchant_create").GET,
    sign : require('./sign'),
    getRegion : require('./getRegion'),
    supervisorCreate : require('./supervisor_create').GET,
    merchantAdminCreate : require('./merchant_admin_create').GET,
    order_confirm : require("./order_confirm"),
    qrcode : require('./qrcode')
};

var POST = {
    merchantCreate : require("./merchant_create").POST,
    supervisorCreate : require('./supervisor_create').POST,
    merchantAdminCreate : require('./merchant_admin_create').POST,
    order : require('./order')
};

router.get('/merchant_create', GET.merchantCreate);
router.get('/supervisor_create', GET.supervisorCreate);
router.get('/merchant_admin_create', GET.merchantAdminCreate);
router.get('/sign', GET.sign);
router.get('/getRegion', GET.getRegion);
router.get('/order_confirm', GET.order_confirm);
router.get('/qrcode', GET.qrcode);

// router.get('/MP_verify_8vDF2l164kRpiYeG.txt', function(req,res,next){
    // res.send('8vDF2l164kRpiYeG');
// });

router.post('/merchant_create', POST.merchantCreate);
router.post('/supervisor_create', POST.supervisorCreate);
router.post('/merchant_admin_create', POST.merchantAdminCreate);
router.post('/order', POST.order)

module.exports = router;
